package com.bot.edu.utils;

import cn.hutool.core.date.DateTime;
import com.bot.edu.noticessystem.notices.entity.Notices;

public class ToNotices {
    public static String userId;

    public static Notices toNoticesById(String id,String about){
        Notices notices = new Notices();
        notices.setId(SnowFlake.getId());
        notices.setNoticesId(SnowFlake.getId());
        notices.setNoticeNameId(id);
        notices.setId(SnowFlake.getId());
        notices.setNoticeTitle("<p>平台通知</p>");
        notices.setReleasingAbout("<p>"+about+"</p>");
        notices.setNoticeState(0+"");
        notices.setCreateTime(new DateTime());
        notices.setNoticeRole(2+"");
        return notices;
    }

    public static Notices toNotices(String about){
        Notices notices = new Notices();
        notices.setId(SnowFlake.getId());
        notices.setNoticesId(SnowFlake.getId());
        notices.setNoticeNameId(userId);
        notices.setId(SnowFlake.getId());
        notices.setNoticeTitle("<p>平台通知</p>");
        notices.setReleasingAbout("<p>"+about+"</p>");
        notices.setNoticeState(0+"");
        notices.setCreateTime(new DateTime());
        notices.setNoticeRole(2+"");
        return notices;
    }
}